import Vue from 'vue'
import Router from 'vue-router'
import Container from '@/Container'
import Search from '@/components/Search'
import Statistic from '@/components/Statistic'
import Login from '@/Login'
import ManagePanel from '@/components/ManagePanel'

Vue.use(Router)

export default new Router({
  routes: [
  {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/',
      name: 'Container',
      component: Container,
      meta: {requiresAuth: true}
    },
    {
      path: '/search',
      name: 'Search',
      component: Search,
      meta: {requiresAuth: true} 
    },
    {
      path: '/statistic',
      name: 'Statistic',
      component: Statistic,
      meta: {requiresAuth: true}
    },
    {
      path: '/manage',
      name: 'ManagePanel',
      component: ManagePanel,
      meta: {requiresAuth: true}
    }
  ]
})
